<?php
session_start();
if (isset($_POST['id'])){
    include '../c/config.php';
    $openid='';
    if (isset($_SESSION['openid'])) {
         $openid=$_SESSION['openid'];
    }
    $id=trim($_POST['id']);
     
    $mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
    if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqli->error);}
    $mysqli->query("INSERT INTO `c_log` (`id`, `openid`,`msg`,`createtime`) VALUES (NULL,'".$openid."','".$id."', '".date("Y-m-d H:i:s")."')");
    $mysqli->close();
     

    echo json_encode(array('s'=>'1'));
}else{
    echo json_encode(array('s'=>'2'));
}

?>


